package pe.edu.upc.dsd.whereeat.jobs;


import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.scheduling.quartz.QuartzJobBean;


public class SenderMailJob extends QuartzJobBean{


	private JmsTemplate jmstemplate;
	
	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		// TODO Auto-generated method stub
		try {
			
			getJmstemplate().convertAndSend("queue_request", "Hello World");
			System.out.println("modellll");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public JmsTemplate getJmstemplate() {
		return jmstemplate;
	}

	public void setJmstemplate(JmsTemplate jmstemplate) {
		this.jmstemplate = jmstemplate;
	}



	
	

}
